﻿using DataModels.Enums.NeighborCircle;
using System.Security.Policy;
using Utils;
using static DataModels.Enums.GeneralEnum;

namespace DataModels.Dto.NeighborCircle
{
    public class GetNeighborCircleForumPostCategoryInfo
    {
        /// <summary>
        /// 帖子类型
        /// </summary>
        public NeighborCircleForumPostType? PostType { get; set; }
    }
    public class GetNeighborCircleForumPostInfo : PageRequest
    {
        /// <summary>
        /// 小区UUID
        /// </summary>
        public Guid? ProjectUUID { get; set; }

        /// <summary>
        /// 创建人
        /// </summary>
        public Guid? UserUUID { get; set; }

        /// <summary>
        /// 分类UUID
        /// </summary>
        public Guid? NeighborCircleForumPostCategoryUUID { get; set; }

        /// <summary>
        /// 小分类UUID
        /// </summary>
        public Guid? NeighborCircleForumPostCategorySubUUID { get; set; }

        /// <summary>
        /// 话题UUID
        /// </summary>
        public Guid? NeighborCircleForumPostTalkUUID { get; set; }

        /// <summary>
        /// 帖子类型
        /// </summary>
        public NeighborCircleForumPostType? PostType { get; set; }

        /// <summary>
        /// 是否推荐
        /// </summary>
        public Status? IsRecommend { get; set; }
    }

    public class GetNeighborCircleForumPostDto
    {
        public Guid UUID { get; set; }
        /// <summary>
        /// 帖子类型
        /// </summary>
        public NeighborCircleForumPostType PostType { get; set; } = NeighborCircleForumPostType.Post;

        /// <summary>
        /// 标题
        /// </summary>
        public string? Title { get; set; }

        /// <summary>
        /// 内容
        /// </summary>
        public string Content { get; set; }

        /// <summary>
        /// 分享次数
        /// </summary>
        public int ShareCount { get; set; } = 0;

        /// <summary>
        /// 点赞次数
        /// </summary>
        public int LikeCount { get; set; } = 0;

        /// <summary>
        /// 评论次数
        /// </summary>
        public int CommentCount { get; set; } = 0;

        /// <summary>
        /// 头像
        /// </summary>
        public string AvatarUrl { get; set; }

        /// <summary>
        /// 用户名
        /// </summary>
         public string DisplayName { get; set; }

        /// <summary>
        /// 附件
        /// </summary>
        public List<string> Urls { get; set; }
    }

    public class GetNeighborCircleForumPostDetailDto
    {
        public Guid UUID { get; set; }

        /// <summary>
        /// 话题
        /// </summary>
        public Guid? NeighborCircleForumPostTalkUUID { get; set; }

        /// <summary>
        /// 活动
        /// </summary>
        public Guid? NeighborCircleForumPostActivitiesUUID { get; set; }

        /// <summary>
        /// 小区名称
        /// </summary>
        public string ProjectName { get; set; }

        /// <summary>
        /// 头像
        /// </summary>
        public string AvatarUrl { get; set; }

        /// <summary>
        /// 显示名称
        /// </summary>
        public string DisplayName { get; set; }

        public string Content { get; set; }

        /// <summary>
        /// 图片视频
        /// </summary>
        public List<string> Urls { get; set; }

        /// <summary>
        /// 分享次数
        /// </summary>
        public int ShareCount { get; set; }

        /// <summary>
        /// 点赞次数
        /// </summary>
        public int LikeCount { get; set; }

        /// <summary>
        /// 是否点赞
        /// </summary>
        public Status IsLike { get; set; } = Status.Disable;

        /// <summary>
        /// 是否想要
        /// </summary>
        public Status IsWant { get; set; } = Status.Disable;

        /// <summary>
        /// 评论次数
        /// </summary>
        public int CommentCount { get; set; }

        public DateTime CreateTime { get; set; }

    }

    public class GetNeighborCircleForumPostLikesInfo : PageRequest
    {
        [GeneralRequired]
        public Guid NeighborCircleForumPostUUID { get; set; }
    }
    public class GetNeighborCircleForumPostCommentInfo : PageRequest
    {
        [GeneralRequired]
        public Guid NeighborCircleForumPostUUID { get; set; }
    }

    public class GetNeighborCircleForumPostCommentDto
    {
        public Guid UUID { get; set; }
        /// <summary>
        /// 头像
        /// </summary>
        public string AvatarUrl { get; set; }

        /// <summary>
        /// 显示名称
        /// </summary>
        public string DisplayName { get; set; }

        public string Content { get; set; }

        /// <summary>
        /// 点赞次数
        /// </summary>
        public int LikeCount { get; set; }

        /// <summary>
        /// 是否点赞
        /// </summary>
        public Status IsLike { get; set; } = Status.Disable;

        public DateTime CreateTime { get; set; }

        /// <summary>
        /// 子评论
        /// </summary>
        public List<GetNeighborCircleForumPostCommentDto> SubComment { get; set; } = [];
    }

    public class CreateNeighborCircleForumPostCommentInfo
    {
        [GeneralRequired]
        public Guid NeighborCircleForumPostUUID { get; set; }

        /// <summary>
        /// 父级评论UUID
        /// </summary>
        public Guid? ParentCommentUUID { get; set; }

        [GeneralRequired]
        public string Content { get; set; }
    }


    public class CreateNeighborCircleForumPostInfo
    {
        /// <summary>
        /// 小区UUID
        /// </summary>
        [GeneralRequired]
        public Guid ProjectUUID { get; set; }

        /// <summary>
        /// 分类UUID
        /// </summary>
        public Guid? NeighborCircleForumPostCategoryUUID { get; set; }

        /// <summary>
        /// 小分类UUID
        /// </summary>
        public Guid? NeighborCircleForumPostCategorySubUUID { get; set; }

        /// <summary>
        /// 话题UUID
        /// </summary>
        public Guid? NeighborCircleForumPostTalkUUID { get; set; }

        /// <summary>
        /// 活动
        /// </summary>
        public Guid? NeighborCircleForumPostActivitiesUUID { get; set; }

        /// <summary>
        /// 帖子类型
        /// </summary>
        public NeighborCircleForumPostType PostType { get; set; } = NeighborCircleForumPostType.Post;

        /// <summary>
        /// 经度
        /// </summary>
        public decimal? Longitude { get; set; }

        /// <summary>
        /// 纬度
        /// </summary>
        public decimal? Latitude { get; set; }

        /// <summary>
        /// 标题
        /// </summary>
        public string? Title { get; set; }

        [GeneralRequired]
        public string Content { get; set; }

        /// <summary>
        /// 是否限制小区可见
        /// </summary>
        public Status? IsLimit { get; set; } = Status.Disable;

        /// <summary>
        /// 附件 - 图片/视频
        /// </summary>
        public List<string> Urls { get; set; } = [];

        /// <summary>
        /// 二手交易同意后发送的信息
        /// </summary>
        public string? ExtendJson { get; set; }
    }
}
